﻿@model CultuRAM.Models.LoginModel

@{
    Layout = null;
}

@{
    ViewBag.Title = "Autenticação";
    var v = ViewBag.LoginError;
    //var v1 = @ViewData.ModelState["LoginError"].Errors[0];
}

<!DOCTYPE html>

<html>
      
    <head>
        <meta name="viewport" content="width=device-width" />
        <title>@ViewBag.Title</title>

        @Styles.Render("~/Content/bootstrap2")
        @Styles.Render("~/Content/backoffice")   
        @Styles.Render("~/Content/fonts")   
        @Scripts.Render("~/bundles/jquery")
        @Scripts.Render("~/bundles/jqueryui")
        @Scripts.Render("~/bundles/bootstrap")
        @Scripts.Render("~/bundles/bootbox")
        @Scripts.Render("~/bundles/bootstrap2")
        @Scripts.Render("~/bundles/jqueryval")
        @Scripts.Render("~/bundles/culturam")

    </head>

    <body style="margin: 0 10px 0 10px">
        
        <!-- MENU -->
        <section id="menu">
            @Html.Partial("_MenuHome")
        </section>
        
        <!-- MAIN AREA -->
        <section id="main" style="background-color: white; min-height: 530px">
            
            <br/>
            <!-- LOGIN AREA -->
            <section id="login" style="padding-left: 400px;">
                <div id="authArea" class="authArea" >                         
                    <div>
                        <h4>AUTENTICAÇÃO</h4><hr/>
                    </div>
                    
                    @if (!String.IsNullOrEmpty(ViewBag.LoginError))
                    {       
                        <div class="alert alert-danger">
                            <button type="button" class="close" data-dismiss="alert">×</button>   
                            @ViewBag.LoginError 
                        </div> 
                    }
           
                    @using (Html.BeginForm("Login", "Account", new {ReturnUrl = ViewBag.ReturnUrl}, FormMethod.Post, new {@class = "form-horizontal", @style = "padding: 10px 0 0 0;"}))
                    {
                       @Html.AntiForgeryToken()
                        @*@Html.ValidationSummary(false)
                        @Html.ValidationMessage("LoginError")
                        @ViewData.ModelState["LoginError"].Errors[0].ErrorMessage*@
              
                        <div class="control-group">
                            @Html.LabelFor(m => m.Email, new { @class = "control-label" })
                            <div class="controls">
                                <div class="input-prepend">
                                    <span class="add-on"><i class="icon-envelope"></i></span>
                                    @Html.TextBoxFor(m => m.Email, new { @class = "form-control" })<br/>
                                    @*@Html.ValidationMessageFor(m => m.Email, null, new { @class = "", @style = "z-index: 200;" })*@
                                </div>
                            </div>
                        </div>
                        
                        <div class="control-group">
                            @Html.LabelFor(m => m.Password, new { @class = "control-label" })
                            <div class="controls">
                                <div class="input-prepend">
                                    <span class="add-on"><i class="icon-lock"></i></span>
                                    @Html.PasswordFor(m => m.Password, new { @class = "" })<br/>
                                    @*@Html.ValidationMessageFor(m => m.Password)*@       
                                </div>
                                <a href="#">Esqueceu-se da Palavra-passe?</a>
                            </div>
                        </div>
                        

                        <hr/>

                        <div class="form-inline" style="padding-left: 180px;">        
                            @Html.CheckBoxFor(m => m.RememberMe)
                            @Html.LabelFor(m => m.RememberMe, new { @class = "checkbox", @style = "padding-right: 10px;" })
                            <button type="submit" class="btn btn-primary" value="Entrar">Entrar</button>
                        </div>
                   
                   }
             
                </div>
      
            </section>
            
            <br />        
            <!-- ALERT MENSSAGE -->
            @*            <div id="msg" style="padding-left: 320px;">            
                <div class="alert alert-error" style="width: 60%;">
                    <button type="button" class="close" data-dismiss="alert">&times;</button>
                    <span><strong>Dados Inválidos!</strong> Confirma o nome de utilizador e palavra-passe.</span>
                </div>
            </div>*@

        </section> 


        <!-- FOOTER -->
        <div id="footer">       
            @Html.Partial("_Footer") 
        </div>

   
@*      @Scripts.Render("~/bundles/jquery")
      @Scripts.Render("~/bundles/jqueryui")
      @Scripts.Render("~/bundles/jqueryval")
      @Scripts.Render("~/bundles/bootstrap")
      @Scripts.Render("~/bundles/bootbox")
      @Scripts.Render("~/bundles/bootstrap2")
      @Scripts.Render("~/bundles/culturam")*@
        @Scripts.Render("~/bundles/culturam")

    </body>
</html>














